LIBRARY IEEE;    									--使用标准库
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY CHECK IS									--实体定义
    PORT(A:IN STD_LOGIC_VECTOR(7 downto 0);		--端口定义
          Y:OUT STD_LOGIC);
END CHECK;
ARCHITECTURE rtl OF CHECK IS
BEGIN
PROCESS(Al)
    VARIABLE TMP: STD_LOGIC;
    BEGIN
        TMP='0';
        FOR i IN 0 to 7 LOOP							--使用循环结构
            TMP= TMP XOR A(i);
        END LOOP;
    END PROCESS;
END rtl;
